author profile image

Matt Reid

Solo Entrepreneur | Lead Software Architect

I was recently running a webapp on tomcat that needed to run on port 80 for the links to work. This isn’t easy in osx as port 80 is already being used by other things. The simplest way was to start tomcat on port 8080 (default) and set up forwarding...

Communication with an XML-RPC server via Java is extremely easy with the apache XML-RPC library using the following snippet: XmlRpcClient client = new XmlRpcClient(); XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();// Setting timeouts for xmlrpc calls made using XmlRpcSunHttpTransportFactory, the default connection factory int xmlrpcConnTimeout = 10000; // Connection timeout int xmlrpcReplyTimeOut...

I recently found the following post on stackoverflow here, simply add the following code (sorry, no xml version) tabHost.getTabWidget().getChildAt(0).getLayoutParams().height = 25; If you have your tabs positioned at the bottom of the screen, make sure you give android:gravity=”bottom” to your layout  

Just a quick note, I had the following exception when adding tabs to a tabhost in an android app that I”m building 11-03 22:54:09.530: ERROR/AndroidRuntime(508): at android.widget.TabHost.addTab(TabHost.java:207) The fix (after some googling) seems to be to add the following before adding any tabs to a tabhost tabHost.setup();  

I recently needed to work out the intersection of 2 text files and the lines that didn’t match in 2 documents, after some googling I found the following 2 lines of script that take 2 files and pipe the output to a new file Intersection of 2 files grep -Fxv...